#!/usr/bin/ksh


data_do=$(date +'%d') 




date >> /script/backup_arch_init_out.txt
echo 'start rman backup arch '>> /script/backup_arch_init_out.txt


x1oooo=$(date +"%y_%m_%d")
sed   's/x1oooo/'$x1oooo'/g'  /script/backup_arch.rtpl  >/script/backup_arch.rman  



#rman  backup
export LANG=en_US
export NLS_LANG="simplified chinese_china".zhs16gbk
export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' 
export ORACLE_BASE=/ora10g
export ORACLE_HOME=$ORACLE_BASE/db
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl1





rman target /  cmdfile=/script/backup_arch.rman  log=/script/backup_arch.rman.log  
    

 

date >> /script/backup_arch_init_out.txt
echo 'end rman backup '>> /script/backup_arch_init_out.txt



